package com.gp.geits.Enum;

import lombok.Getter;
import lombok.ToString;

/**
 * @author lzf
 * @date 2022-03-09 15:45
 */
@Getter
@ToString
public enum ResultCodeEnum {
    SUCCESS(true, 200,"成功"),
    UNKNOWN_REASON(false, 201, "未知错误"),

    PARAM_ERROR(false, 211, "参数不正确"),

    REVISE_ERROR(false,223,"修改失败"),
    FETCH_USERINFO_ERROR(false, 224, "获取用户信息失败"),
    LOGIN_ERROR(false, 225, "登录失败"),

    PHONE_EXISTS(false, 231, "手机号已存在"),
    STUNO_EXISTS(false,232,"学号已存在"),
    USER_NOT_EXISTS(false,233,"用户不存在"),
    QUESTIONNAIRE_NOT_EXISTS(false,234,"问卷不存在"),
    QUESTION_NOT_EXISTS(false,235,"问题不存在"),
    USER_RESPONSE_NOT_EXISTS(false,236,"用户回答不存在"),
    QUESTIONNAIRE_EXISTS(false,237,"问卷已存在"),

    LOGIN_PASSWORD_ERROR(false, 241, "密码不正确"),
    LOGIN_AUTH(false, 242, "需要登录"),
    LOGIN_ACL(false, 243, "没有权限"),
    OLD_PASSWORD_ERROR(false,244,"原密码不正确");


    private Boolean success;

    private Integer code;

    private String message;

    ResultCodeEnum(Boolean success, Integer code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }
}
